<?php


namespace app\common\model;


use think\Model;
class UserHouse extends Model
{
    protected $autoWriteTimestamp = true;
    protected $type = [
        'create_time'    =>  'integer',
    ];
    public function user(){
      return  $this->belongsTo('User');
    }
    public function houseNature(){
        return  $this->belongsTo('HouseNature','nature_id');
    }
    public function getProvinceAttr($value){
        return $value;
    }
    public function getCityAttr($value){
        return $value;
    }
    public function getDistrictAttr($value){
        return $value;
    }
    public function getAddressAttr($value){
        return $value;
    }
    public function getFullAddressAttr(){
        return "{$this->province}{$this->city}{$this->district}{$this->address}";
    }
}